home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 2 / ETO Development Tools 2.iso / Tools - Objects / MacApp / MacApp CD Release / MacApp® 2.0.1 Tutorial / Chapter 09 / IconEdit.r next >
Encoding:
Text File  |  1990-10-25  |  4.3 KB  |  148 lines  |  [TEXT/MPS ]

  1. /*********************************************************************************/
  2. /* IconEdit.r                                                                     */
  3. /*                                                                                 */
  4. /* Copyright © 1989 Apple Computer, Inc.  All rights reserved.                       */
  5. /*                                                                                  */
  6. /*********************************************************************************/
  7.  
  8. /* ==============================   Includes   ================================= */
  9.  
  10. #ifndef _TYPES.R_
  11. #include "Types.r"
  12. #endif
  13.  
  14. #ifndef _MacAppTypes_
  15. #include "MacAppTypes.r"
  16. #endif
  17.  
  18. #ifndef __ViewTypes__
  19. #include "ViewTypes.r"
  20. #endif
  21.  
  22. #if qDebug
  23. include "Debug.rsrc";
  24. #endif
  25. include "MacApp.rsrc";
  26.  
  27. include "IconEdit" 'CODE';
  28.  
  29.  
  30. /* ==============================   Constants   ================================ */
  31.  
  32. #define kSeedIconId            1000
  33.  
  34. #define kIconWindowId        1000
  35.  
  36. #define kIconWindowHeight    32 * 7 + 10     /* 7 times actual size, 5 pixel borders */
  37. #define kIconWindowWidth    32 * 7 + 10     /* 7 times actual size, 5 pixel borders */
  38.  
  39.  
  40.  
  41. /* ==============================   Seed Icon   ================================ */
  42.  
  43. resource 'ICON' (kSeedIconId, purgeable) {
  44.     $"0001 0000 0002 8000 0004 4000 0008 2000 0010 1000 0020 0800 0040 0400 0080 0200"
  45.     $"0100 0100 0200 0080 0400 0040 0800 0020 1000 0010 2000 0008 4000 3F04 8000 4082"
  46.     $"4000 8041 2001 3022 1001 C814 080E 7F8F 0402 3007 0201 0007 0100 8007 0080 6007"
  47.     $"0040 1FE7 0020 021F 0010 0407 0008 0800 0004 1000 0002 2000 0001 4000 0000 8000"
  48. };
  49.  
  50.  
  51.  
  52.  
  53. /* =============================   Icon Window   =============================== */
  54.  
  55. resource 'view' (kIconWindowId, purgeable) {
  56.     {
  57.         root, 'WIND', { 50, 20 }, { kIconWindowHeight, kIconWindowWidth },
  58.         sizeVariable, sizeVariable, shown, enabled,
  59.         Window        { "", zoomDocProc, goAwayBox, resizable, modeless,
  60.                     ignoreFirstClick, freeOnClosing, disposeOnFree, closesDocument,
  61.                     openWithDocument, dontAdaptToScreen, stagger, forceOnScreen,
  62.                     dontCenter, noid, "" };
  63.     }
  64. };
  65.  
  66. /* NOTE: if you used ViewEdit, then replace the above resource description by:  */
  67. /* include "Views.rsrc" 'view';                                                 */
  68.  
  69.  
  70. /* ================================   Menus   ================================== */
  71.  
  72. resource 'cmnu' (mApple) {
  73.     1,
  74.     textMenuProc,
  75.     0x7FFFFFFD,
  76.     enabled,
  77.     apple,
  78.      {
  79.     /* [1] */    "About IconEdit…",    noIcon,    noKey,    noMark,    plain,    cAboutApp;
  80.     /* [2] */    "-",                noIcon,    noKey,    noMark,    plain,    nocommand
  81.     }
  82. };
  83.  
  84.  
  85. /* ------------------------------------------------------------------------------ */
  86.  
  87. resource 'cmnu' (mFile) {
  88.     2,
  89.     textMenuProc,
  90.     allEnabled,
  91.     enabled,
  92.     "File",
  93.      {
  94.     /* [1] */    "New",                noIcon,    "N",    noMark,    plain,    cNew;
  95.     /* [2] */    "Open…",            noIcon,    "O",    noMark,    plain,    cOpen;
  96.     /* [3] */    "-",                noIcon,    noKey,    noMark,    plain,    nocommand;
  97.     /* [4] */    "Close",            noIcon,    noKey,    noMark,    plain,    cClose;
  98.     /* [5] */    "Save",                noIcon,    noKey,    noMark,    plain,    cSave;
  99.     /* [6] */    "Save As…",            noIcon,    noKey,    noMark,    plain,    cSaveAs;
  100.     /* [7] */    "Revert to Saved",    noIcon,    noKey,    noMark,    plain,    cRevert;
  101.     /* [8] */    "-",                noIcon,    noKey,    noMark,    plain,    nocommand;
  102.     /* [9] */    "Page Setup…",        noIcon,    noKey,    noMark,    plain,    cPageSetup;
  103.     /* [10] */    "Print…",            noIcon,    noKey,    noMark,    plain,    cPrint;
  104.     /* [11] */    "-",                noIcon,    noKey,    noMark,    plain,    nocommand;
  105.     /* [12] */    "Quit",                noIcon,    "Q",    noMark,    plain,    cQuit
  106.     }
  107. };
  108.  
  109.  
  110. /* ------------------------------------------------------------------------------ */
  111.  
  112. resource 'cmnu' (mEdit) {
  113.     3,
  114.     textMenuProc,
  115.     allEnabled,
  116.     enabled,
  117.     "Edit",
  118.      {
  119.     /* [1] */    "Undo",                noIcon,    "Z",    noMark,    plain,    cUndo;
  120.     /* [2] */    "-",                noIcon,    noKey,    noMark,    plain,    nocommand;
  121.     /* [3] */    "Cut",                noIcon,    "X",    noMark,    plain,    cCut;
  122.     /* [4] */    "Copy",                noIcon,    "C",    noMark,    plain,    cCopy;
  123.     /* [5] */    "Paste",            noIcon,    "V",    noMark,    plain,    cPaste;
  124.     /* [6] */    "Clear",            noIcon,    noKey,    noMark,    plain,    cClear;
  125.     /* [7] */    "-",                noIcon,    noKey,    noMark,    plain,    nocommand;
  126.     /* [8] */    "Show Clipboard",    noIcon,    noKey,    noMark,    plain,    cShowClipboard
  127.     }
  128. };
  129.  
  130.  
  131. /* ------------------------------------------------------------------------------ */
  132.  
  133. resource 'cmnu' (mBuzzWords) {
  134.     mBuzzWords,
  135.     textMenuProc,
  136.     allEnabled,
  137.     enabled,
  138.     "Buzzwords",
  139.      {
  140.     /* [1] */    "Page Setup Change", noIcon, noKey, noMark, plain, cChangePrinterStyle
  141.     }
  142. };
  143.  
  144.  
  145. /* ------------------------------------------------------------------------------ */
  146.  
  147. resource 'MBAR' (kMBarDisplayed) { {mApple; mFile; mEdit} };
  148.